#include<stdio.h>
#include<math.h>

int main()
{
    int score, max, min, sum;
    score=0;
    max=0;
    min=100;
    sum=0;
    for(int i=0;i<10;i++)
    {
        printf("Please input your score%d:",i+1);
        scanf("%d",&score);
        sum+=score;
        if(score>max) max=score;
        if(score<min) min=score;
    }
    int average=(sum-max-min)/8;
    printf("%d\n",average);
}